<?php if($form->hasErrors()): ?>
<ul>
  <?php foreach($form->getErrorSchema()->getErrors() as $error): ?>
  <li><?php echo $error ?></li>
  <?php endforeach; ?>
</ul>
<?php endif; ?>

<?php echo $form->renderFormTag('register') ?>
<table>
  <tr>
    <td>First Name: </td>
    <td><?php echo $form['firstname'] ?></td>
  </tr>
  <tr>
    <td>Last Name: </td>
    <td><?php echo $form['lastname'] ?></td>
  </tr>
  <tr>
    <td>Email: </td>
    <td><?php echo $form['email'] ?></td>
  </tr>
  <tr>
    <td>Repeat Email: </td>
    <td><?php echo $form['email2'] ?></td>
  </tr>
  <tr>
    <td>Password: </td>
    <td><?php echo $form['password'] ?></td>
  </tr>
  <tr>
    <td>Repeat Password: </td>
    <td><?php echo $form['password2'] ?></td>
  </tr>
  <tr>
    <td>Birth Date: </td>
    <td><?php echo $form['birth_date'] ?></td>
  </tr>
  <tr>
    <td>Sex: </td>
    <td><?php echo $form['sex'] ?></td>
  </tr>
  <tr>
    <td>Phone: </td>
    <td><?php echo $form['phone'] ?></td>
  </tr>
  <tr>
    <td>Mobile: </td>
    <td><?php echo $form['mobile'] ?></td>
  </tr>
  <tr>
    <td><?php echo $form['_csrf_token'] ?></td>
  </tr>
<tr>
  <td><input type="submit" value="Register" name="submit-register"/></td>
</tr>
</table>
</form>